<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>登录获取session</title>
		<script src="js/utils/jquery.min.js" type="text/javascript"></script>
		<script src="js/utils/baseUrl.js"></script>
	</head>
	<body>

		<span>登录测试：admin 123456 获取session</span>
		<img id="codeImg" alt="刷新验证码！" style="margin-bottom: -12px; cursor: pointer;" src="http://localhost:6139/Core/verify_code.ashx"
		 onclick="this.src=this.src+'?'" />

		<input id="ValidateCode" />
		<button id="login">登录</button>
		<button id="getData">获取数据</button>
		<script>
			$("#login").on("click", function() {

				var Code = $("#ValidateCode").val();
				//登录
				var data = {
					UserName: "admin",
					Password: "123456",
					Code: Code
				};
				console.log(data)

				http.ajax("post", "/zh-CN/Account/Login", data, function(data) {
					console.log("登录成功")
					console.log(data)
				})
			})

			$("#getData").on("click", function() {
				http.ajax("post", "/zh-CN/Home/GetTopMenu", "", function(data) {
					console.log("获取成功")
					console.log(data)
				})


			})
		</script>
	</body>
</html>
